package org.uranus.consul.consumer.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 * Ribbon测试
 * @author uranus
 *
 */
@Service
public class RibbonService {
	@Autowired
	private RestTemplate restTemplate;
	
	/**
	 * 远程调用服务
	 * @return
	 */
	public String hello() {
		String str=restTemplate.getForObject("http://consul-provider/hi", String.class);
		return str;
	}
}
